﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Principal;
using System.Web;
using SilentVoice.Models;

namespace SilentVoice.Security
{
    public class SVPrincipal : GenericPrincipal
    {
        private Role.RoleTypes role;
        private User user;
        IIdentity identity;

        public SVPrincipal(IIdentity identity, User user, Role role) : base(identity, new string[]{role.Name.ToString()})
        {
            this.role = role.Name;
            this.user = user;
        }

        public User User { get { return user; } }
        public string Role { get { return role.ToString(); } }
    }
}